package com.ccnf.model.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.ccnf.model.group.Insert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author developer
 * @since 2018-06-07
 */
@TableName("invitation_forward")
@Data
public class InvitationForward extends Model<InvitationForward> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(hidden = true)
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 分享ID
     */
    @TableField("share_id")
    @ApiModelProperty("分享ID")
    @Null(message = "不用传",groups = Insert.class)
    private Long shareId;
    /**
     * 邀请函ID
     */
    @TableField("invitation_id")
    @ApiModelProperty("邀请函ID")
    @NotNull(message = "不能为空",groups = Insert.class)
    private Long invitationId;
    /**
     * 转发的用户ID
     */
    @ApiModelProperty("转发的用户ID")
    @TableField("user_id")
    @NotNull(message = "不能为空",groups = Insert.class)
    private Long userId;
    /**
     * 转发的时间
     */
    @ApiModelProperty("转发的时间")
    @TableField("forward_time")
    private Long forwardTime;


    @Override
    protected Serializable pkVal() {
        return this.shareId;
    }


}
